<!--来源http://www.thinkphp.cn/code/3505.html-->
<div class="form-group">
    <label class="col-sm-2 control-label">[title]</label>
    <div class="col-sm-7 upload-box">
        <div class="image-box clear">
            {if condition="isset($info['[name]']) && !empty($info['name'])"}
            <?php
            $data = is_array($info['[name]']) ? $info['[name]'] : [$info['[name]']];
            ?>
            {volist name="data" id="v"}
            <section class="image-section">
                <div class="image-shade"></div>
                <div class="image-delete"></div>
                <img class="image-show" src="{$v}" />
                <input name="[name][]" value="{$v}" type="hidden" />
            </section>
            {/volist}
            {/if}
            <section class="upload-section">
                <div class="upload-btn"></div>
                <input type="file" name="file" set-name="[name]" id="upload-input" value=""/>
            </section>
        </div>
    </div>
</div>
<script type="application/javascript">
    $("#upload-input").ajaxImageUpload({
        url: "{:url('File/store')}", //上传的服务器地址
        // data: { name:'勾国印' },
        data:{},
        maxNum: [maxNum], //允许上传图片数量
        zoom: true, //允许放大
        allowType: ["gif", "jpeg", "jpg", "bmp",'png','zip'], //允许上传图片的类型
        maxSize :2, //允许上传图片的最大尺寸，单位M
        callbackFieldName:'saveName',
        before: function () {
            // alert('上传前回调函数');
        },
        success:function(data){
            // alert('上传成功回调函数');
            // console.log(data);
        },
        error:function (e) {
            // alert('上传失败回调函数');
            // console.log(e);
        }
    });
</script>